Skip to content

refactor(create-void): delegate scaffolding to void init - #894

Open
yuikisaito wants to merge 12 commits into
voidzero-dev:mainfrom
yuikisaito:issue-888
Open

yuikisaito wants to merge 12 commits into
voidzero-dev:mainfrom
yuikisaito:issue-888

Conversation

@yuikisaito

@yuikisaito yuikisaito commented Nov 21, 2026 •

Copy link
Copy Markdown

Summary

Fixes an issue where running create-void inside an existing pnpm monorepo unconditionally created a nested pnpm-workspace.yaml in the target subdirectory, causing pnpm install to treat the subdirectory as an isolated workspace root.

When pnpm is detected, create-void now locates the enclosing workspace root and merges Void's required allowBuilds entries into the root pnpm-workspace.yaml while preserving existing workspace settings, comments, and build approvals.

Remaining Tasks

  • Detect enclosing pnpm workspace root and merge allowBuilds into root pnpm-workspace.yaml
  • Add --no-install flag to skip running local package installation
  • Instead of pre-installing the Void CLI, create-void temporarily executes the same version of void init via dlx to delegate scaffolding.
  • Centralize pnpm workspace root detection and allowBuilds updates into void init (already implemented on the void init side).
  • Forward create-void --no-install to void init to skip project dependency installation.
  • Test standalone and workspace scaffolding for correct lockfile placement.

Related Issues

Fixes #888

@yuikisaito yuikisaito changed the title fix(create-void): merge pnpm build policy into workspace config fix: support pnpm workspaces and --no-install Nov 21, 2026
@yuikisaito
yuikisaito marked this pull request as ready for review November 21, 2026 11:54
@yuikisaito
yuikisaito requested a review from a team as a code owner November 21, 2026 11:54
@yuikisaito
yuikisaito marked this pull request as draft November 21, 2026 16:36
@yuikisaito

Copy link
Copy Markdown
Author

@cpojer

While implementing #888, I noticed some overlap with void init. Before moving this out of draft, I'd like to get your thoughts on reorganizing responsibilities between create-void and void init to avoid duplication:

  1. Delegate allowBuilds and installation to void init: Currently, this PR duplicates void init's logic for finding the pnpm workspace root and updating allowBuilds in pnpm-workspace.yaml. Instead, create-void could invoke the matching version of void init directly (e.g., via dlx) to handle workspace configuration and standalone installs, while create-void only runs a final workspace-root install when scaffolding inside an existing monorepo.
  2. Eliminate redundant installs: Right now, create-void runs pnpm install once to bootstrap the CLI, void init runs install after scaffolding, and create-void runs it again. Running the CLI via dlx first would remove the initial bootstrap install and keep dependency installation in one place.

Would you prefer to include this cleanup in this PR, or keep the current scope?

@cpojer

cpojer commented Nov 22, 2026

Copy link
Copy Markdown
Member

We can clean it up. Ideally void init does most of the work, and create-void just delegates to it when possible.

@yuikisaito
yuikisaito marked this pull request as ready for review November 22, 2026 13:20
@yuikisaito yuikisaito changed the title fix: support pnpm workspaces and --no-install refactor(create-void): delegate scaffolding to void init Nov 22, 2026
@Brooooooklyn
Brooooooklyn requested review from Brooooooklyn and removed request for Brooooooklyn November 23, 2026 14:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent the generation of a nested pnpm-workspace.yaml and local pnpm install when running create-void inside an existing monorepo

2 participants